﻿<%@ Page Language="C#" MasterPageFile="~/Student/StuMasterPage.master" AutoEventWireup="true"
    CodeFile="Examing.aspx.cs" Inherits="Student_Default2" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentBody" runat="Server">
    <style type="text/css">
    #examing{
        margin:10px 0px 0px 130px;
    }
    
    </style>
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.floatDiv.js"></script>
    
    <script type="text/javascript">
        $(function(){
	        $("#test").floatdiv({right:"10px",bottom:"10px"}); //设置某个div为浮动的div
        });
        function submitClientClick(){
            alert("You Clicked the button!");
        }
        
    </script>

    正在考试
    <form runat="server">

        <div id="test" style="background-color: #666633; width: 150px; height: 250px; padding: 2px;
            color: white;">
            <div id="姓名">
                姓名</div>
            <div id="总时间">
                总时间</div>
            <div id="剩余时间">
                剩余时间</div>
            <div id="交卷">
                交卷<br />
                <asp:Label ID="msg2" runat="server" />&nbsp;<br />
                <asp:ImageButton ID="imgmsg" ImageUrl="~/Image/登陆.jpg" OnClick="btn_Click" runat="server" />
                <asp:Button ID="SubmitPaper" Text="交卷" OnClientClick="submitClientClick();"  OnClick="btn_Click" runat="server" Width="75px" /></div>
        </div>
        <asp:Label ID="PaperId" runat="server" />
        <asp:Label ID="StuId" runat="server" />
        <h2 align="center" style="color: blue;">
            <%= Request.QueryString["name"] %>
        </h2>
        <hr />
        <div id="examing">
        一、填空题<br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="800px">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Label ID="labeltitle" Text='<%# Container.DataItemIndex+1 +"、" %>' runat="server"> </asp:Label>
                        <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>'></asp:Label><br />
                        <asp:TextBox ID="answer" runat="server" /><br />
                        <asp:Label ID="answerLabel" Visible="false" runat="server" Text='<%#Eval("answer") %>'></asp:Label><br />
                        <asp:Label ID="scoreLabel" Visible="false" runat="server" Text='<%#Eval("score") %>'></asp:Label><br />
                        <asp:Label ID="hardLevelLabel" Visible="false" runat="server" Text='<%# "难度:"+ Eval("hardLevel") %>'></asp:Label><br />
                        <asp:Label ID="analysisLabel" Visible="false" runat="server" Text='<%#"分析:"+ Eval("analysis") %>'></asp:Label><br />                                
                    </ItemTemplate>
                </asp:TemplateField>
                
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:onlineexamConnectionString %>">
        </asp:SqlDataSource>
        <br />
        二、单选题&nbsp;<br />
        
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" Width="800px">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Label ID="labeltitle" Text='<%# Container.DataItemIndex+1 +"、" %>' runat="server"> </asp:Label>
                        <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>'></asp:Label><br />
                        A.
                        <asp:Label ID="choiceALabel" runat="server" Text='<%# Eval("choiceA") %>'></asp:Label><br />
                        B.
                        <asp:Label ID="choiceBLabel" runat="server" Text='<%# Eval("choiceB") %>'></asp:Label><br />
                        C.
                        <asp:Label ID="choiceCLabel" runat="server" Text='<%# Eval("choiceC") %>'></asp:Label><br />
                        D.
                        <asp:Label ID="choiceDLabel" runat="server" Text='<%# Eval("choiceD") %>'></asp:Label><br />
                        <asp:RadioButtonList ID="RadioButtonList2" RepeatColumns="4" RepeatDirection="Horizontal" runat="server">
                            <asp:ListItem Text="A" Value="A" />
                            <asp:ListItem Text="B" Value="B" />
                            <asp:ListItem Text="C" Value="C" />
                            <asp:ListItem Text="D" Value="D" />
                        </asp:RadioButtonList>
                        <asp:Label ID="answerLabel" Visible="false" runat="server" Text='<%# "答案："+Eval("answer") %>'></asp:Label><br />
                        <asp:Label ID="hardLevelLabel" Visible="false" runat="server" Text='<%#"难度："+ Eval("hardLevel") %>'></asp:Label><br />
                        <asp:Label ID="scoreLabel" Visible="false" runat="server" Text='<%#Eval("score") %>'></asp:Label><br />
                        <asp:Label ID="analysisLabel" Visible="false" runat="server" Text='<%#"分析："+ Eval("analysis") %>'></asp:Label><br />                                
                    </ItemTemplate>
                </asp:TemplateField>
                
            </Columns>
        </asp:GridView>
        
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:onlineexamConnectionString %>">
        </asp:SqlDataSource>
        <br />
        三、多选题
        <br />
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataKeyNames="id,paperId,multipleChoiceId,Expr1" Width="800px">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Label ID="labeltitle" Text='<%# Container.DataItemIndex+1 +"、" %>' runat="server"> </asp:Label>
                        <asp:Label ID="title" Text='<%# Eval("title") +"<br />"%>' runat="server" />
                        A.<asp:Label ID="A" Text='<%#Eval("choiceA") %>' runat="server" /><br />
                        B.<asp:Label ID="B" Text='<%#Eval("choiceB") %>' runat="server" /><br />
                        C.<asp:Label ID="C" Text='<%#Eval("choiceC") %>' runat="server" /><br />
                        D.<asp:Label ID="D" Text='<%#Eval("choiceD") %>' runat="server" /><br />
                        E.<asp:Label ID="E" Text='<%#Eval("choiceE") %>' runat="server" /><br />
                        F.<asp:Label ID="F" Text='<%#Eval("choiceF") %>' runat="server" /><br />
                        <asp:CheckBoxList ID="CheckBoxList1" RepeatColumns="6" RepeatDirection="Vertical"
                            runat="server">
                            <asp:ListItem Text="A" Value="A" />
                            <asp:ListItem Text="B" Value="B" />
                            <asp:ListItem Text="C" Value="C" />
                            <asp:ListItem Text="D" Value="D" />
                            <asp:ListItem Text="E" Value="E" />
                            <asp:ListItem Text="F" Value="F" />
                        </asp:CheckBoxList>
                        <asp:Panel ID="shouldHide" Visible="false" runat="server">
                            <asp:Label ID="answerLabel" Text='<%#Eval("answer") %>' Visible="false" runat="server" />
                            <asp:Label ID="hardLevel" Text='<%# "难度:"+Eval("hardLevel") %>' Visible="false" runat="server" />
                            <asp:Label ID="scoreLabel" Text='<%#Eval("score") %>' Visible="false" runat="server" />
                            <asp:Label ID="analysis" Text='<%# "分析:"+Eval("analysis") %>' Visible="false" runat="server" />
                        </asp:Panel>                        
                        </div>
                        <br />
                        <br />
                        <br />
                        <br />
                    </ItemTemplate>
                </asp:TemplateField>
                
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:onlineexamConnectionString %>">
        </asp:SqlDataSource>
        <br />
        <br />
        四、简答题<br />
        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" Width="800px">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Label ID="labeltitle" Text='<%# Container.DataItemIndex+1 +"、" %>' runat="server"/> 
                        <asp:Label ID="title" Text='<%# Eval("title") %>' runat="server" /><br />
                        <asp:TextBox ID="answer" TextMode="MultiLine" runat="server" />
                        <asp:Panel ID="shouldHide" Visible="false" runat="server">
                            <asp:Label ID="answerLabel" Text='<%# Eval("answer") %>' Visible="false" runat="server" />
                            <asp:Label ID="hardLevel" Text='<%# Eval("hardLevel") %>' Visible="false" runat="server" />
                            <asp:Label ID="scoreLabel" Text='<%# Eval("score") %>' Visible="false" runat="server" />
                            <asp:Label ID="analysis" Text='<%# Eval("analysis") %>' Visible="false" runat="server" />
                        </asp:Panel>
                        
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
       
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:onlineexamConnectionString %>"
        >
        </asp:SqlDataSource>
        <br />
        <asp:Button  ID="btn" Text="Button" runat="server" OnClick="btn_Click" EnableViewState="False" />  <br />
        <asp:Label ID="msg" Text="" ForeColor="blue" runat="server" />
        
        </div>
    </form>

                

    
</asp:Content>
